<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" >
    <title>Title</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<table class="table table-hover">
    <tr>
        <th>cno</th>
        <th>cname</th>
        <th>cpno</th>
        <th>ccredit</th>
        <th>tid</th>
        <th>cclass</th>
        <th>cnumber</th>
        <th>操作</th>
    </tr>
    <tr th:each="course:${pageInfo.list}">
        <td th:text="${course.cno}"></td>
        <td th:text="${course.cname}"></td>
        <td th:text="${course.cpno}"></td>
        <td th:text="${course.ccredit}"></td>
        <td th:text="${course.tid}"></td>
        <td th:text="${course.cclass}"></td>
        <td th:text="${course.cnumber}"></td>
        <td><a th:href="'/sc/insertSc?sno='+${session.student.sno}+'&cno='+${course.cno}" style="color: #ff0000">添加</a></td>
    </tr>
</table>
<!--分页-->
<div class="modal-footer no-margin-top">
    <div class="col-md-6 col-xs-8 col-xs-offset-1">
        当前第 [[${pageInfo.pageNum}]]页，共 [[${pageInfo.pages}]] 页， 共 [[${pageInfo.total}]] 条记录
    </div>

    <ul class="pagination pull-right no-margin">
        <li>
            <a th:href="'/course/getAllCourse?pageNum=1'">首页</a>
        </li>
        <li class="prev" th:if="${pageInfo.hasPreviousPage}">
            <a th:href="'/course/getAllCourse?pageNum='+${pageInfo.prePage}">
                <i class="ace-icon fa fa-angle-double-left"></i>
            </a>
        </li>
        <!--遍历条数-->
        <li th:each="nav:${pageInfo.navigatepageNums}">
            <a th:href="'/course/getAllCourse?pageNum='+${nav}" th:text="${nav}" th:if="${nav != pageInfo.pageNum}"></a>
            <span style="font-weight: bold;background: #6faed9;" th:if="${nav == pageInfo.pageNum}" th:text="${nav}" ></span>
        </li>

        <li class="next" th:if="${pageInfo.hasNextPage}">
            <a th:href="'/course/getAllCourse?pageNum='+${pageInfo.nextPage}">
                <i class="ace-icon fa fa-angle-double-right"></i>
            </a>
        </li>
        <li>
            <a th:href="'/course/getAllCourse?pageNum='+${pageInfo.pages}">尾页</a>
        </li>
    </ul>
</div>

</body>
</html>